package com.tanhua.dubbo.api.impl;


import com.tanhua.domain.db.SoulQuestionLevel;
import com.tanhua.dubbo.api.SoulQuestionLevelApi;
import com.tanhua.dubbo.mapper.SoulQuestionLevelMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class SoulQuestionLevelApiImpl implements SoulQuestionLevelApi {
    @Autowired
    private SoulQuestionLevelMapper soulQuestionLevelMapper;
    
    
    /**
     * 添加
     *
     * @param soulQuestionLevel
     */
    @Override
    public void save(SoulQuestionLevel soulQuestionLevel) {
        soulQuestionLevelMapper.insert(soulQuestionLevel);
        
    }
    
    /**
     * 查询出所有问卷的等级信息
     *
     * @return
     */
    @Override
    public List<SoulQuestionLevel> findAll() {
        
        List<SoulQuestionLevel> levelList = soulQuestionLevelMapper.selectList(null);
        
        return levelList;
    }
}
